<template>
  <div class="title" @click="change">
    <slot name="title"></slot>
    <span :class="['iconfont',show?'icon-up':'icon-down']"></span>
  </div>
  <div class="content" v-show="show">
    <slot name="content"></slot>
  </div>
</template>
<script setup>
import {computed, getCurrentInstance, inject, nextTick, onMounted, onUnmounted, ref, watch} from "vue";
import {useRoute, useRouter} from "vue-router";
import {mitter} from "@/eventbus/eventBus.js";

const {proxy} = getCurrentInstance();
const route = useRoute();
const router = useRouter();
const show = ref(false)
const change = ()=>{
  show.value = !show.value
}

</script>
<style scoped lang="scss">
.title{
  cursor: pointer;
  position: static;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  height: 44px;
  padding: 0 10px;
  margin-bottom: 15px;
  background: #f1f2f3;
}
</style>